home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple WWDC 1996
/
WWDC96_1996 (CD).toast
/
Technology Materials
/
MacOS 8 Resources
/
Developer Tools
/
Mac OS 8 Interfaces & Libraries
/
Interfaces
/
PInterfaces
/
CTBUtilities.p
< prev
next >
Wrap
Text File
|
1996-05-01
|
5KB
|
201 lines
{
File: CTBUtilities.p
Contains: Communications Toolbox Utilities interfaces.
Version: Technology: System 7.5
Release: Universal Interfaces 3.0d3 on Copland DR1
Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
Bugs?: If you find a problem with this file, send the file and version
information (from above) and the problem description to:
Internet: apple.bugs@applelink.apple.com
AppleLink: APPLE.BUGS
}
{$IFC UNDEFINED UsingIncludes}
{$SETC UsingIncludes := 0}
{$ENDC}
{$IFC NOT UsingIncludes}
UNIT CTBUtilities;
INTERFACE
{$ENDC}
{$IFC UNDEFINED __CTBUTILITIES__}
{$SETC __CTBUTILITIES__ := 1}
{$I+}
{$SETC CTBUtilitiesIncludes := UsingIncludes}
{$SETC UsingIncludes := 1}
{$IFC UNDEFINED __MEMORY__}
{$I Memory.p}
{$ENDC}
{$IFC UNDEFINED __DIALOGS__}
{$I Dialogs.p}
{$ENDC}
{$IFC UNDEFINED __APPLETALK__}
{$I AppleTalk.p}
{$ENDC}
{$PUSH}
{$ALIGN MAC68K}
{$LibExport+}
{$IFC FOR_SYSTEM7_ONLY }
CONST
{ version of Comm Toolbox Utilities }
curCTBUVersion = 2; { Error codes/types }
ctbuGenericError = -1;
ctbuNoErr = 0;
TYPE
CTBUErr = OSErr;
CONST
chooseDisaster = -2;
chooseFailed = -1;
chooseAborted = 0;
chooseOKMinor = 1;
chooseOKMajor = 2;
chooseCancel = 3;
TYPE
ChooseReturnCode = INTEGER;
CONST
nlOk = 0;
nlCancel = 1;
nlEject = 2;
TYPE
NuLookupReturnCode = INTEGER;
CONST
nameInclude = 1;
nameDisable = 2;
nameReject = 3;
TYPE
NameFilterReturnCode = INTEGER;
CONST
zoneInclude = 1;
zoneDisable = 2;
zoneReject = 3;
TYPE
ZoneFilterReturnCode = INTEGER;
CONST
{ Values for hookProc items }
hookOK = 1;
hookCancel = 2;
hookOutline = 3;
hookTitle = 4;
hookItemList = 5;
hookZoneTitle = 6;
hookZoneList = 7;
hookLine = 8;
hookVersion = 9;
hookReserved1 = 10;
hookReserved2 = 11;
hookReserved3 = 12;
hookReserved4 = 13; { "virtual" hookProc items }
hookNull = 100;
hookItemRefresh = 101;
hookZoneRefresh = 102;
hookEject = 103;
hookPreflight = 104;
hookPostflight = 105;
hookKeyBase = 1000;
{ NuLookup structures/constants }
TYPE
NLTypeEntryPtr = ^NLTypeEntry;
NLTypeEntry = RECORD
hIcon: Handle;
typeStr: Str32;
END;
NLType = ARRAY [0..3] OF NLTypeEntry;
NBPReplyPtr = ^NBPReply;
NBPReply = RECORD
theEntity: EntityName;
theAddr: AddrBlock;
END;
DialogHookProcPtr = ProcPtr; { FUNCTION DialogHook(item: INTEGER; theDialog: DialogPtr): INTEGER; }
NameFilterProcPtr = ProcPtr; { FUNCTION NameFilter(VAR theEntity: EntityName): INTEGER; }
ZoneFilterProcPtr = ProcPtr; { FUNCTION ZoneFilter(theZone: Str32): INTEGER; }
DialogHookUPP = UniversalProcPtr;
NameFilterUPP = UniversalProcPtr;
ZoneFilterUPP = UniversalProcPtr;
CONST
uppDialogHookProcInfo = $000003A0;
uppNameFilterProcInfo = $000000E0;
uppZoneFilterProcInfo = $000000E0;
FUNCTION NewDialogHookProc(userRoutine: DialogHookProcPtr): DialogHookUPP;
{$IFC NOT GENERATINGCFM }
INLINE $2E9F;
{$ENDC}
FUNCTION NewNameFilterProc(userRoutine: NameFilterProcPtr): NameFilterUPP;
{$IFC NOT GENERATINGCFM }
INLINE $2E9F;
{$ENDC}
FUNCTION NewZoneFilterProc(userRoutine: ZoneFilterProcPtr): ZoneFilterUPP;
{$IFC NOT GENERATINGCFM }
INLINE $2E9F;
{$ENDC}
FUNCTION CallDialogHookProc(item: INTEGER; theDialog: DialogPtr; userRoutine: DialogHookUPP): INTEGER;
{$IFC NOT GENERATINGCFM}
INLINE $205F, $4E90;
{$ENDC}
FUNCTION CallNameFilterProc(VAR theEntity: EntityName; userRoutine: NameFilterUPP): INTEGER;
{$IFC NOT GENERATINGCFM}
INLINE $205F, $4E90;
{$ENDC}
FUNCTION CallZoneFilterProc(theZone: Str32; userRoutine: ZoneFilterUPP): INTEGER;
{$IFC NOT GENERATINGCFM}
INLINE $205F, $4E90;
{$ENDC}
FUNCTION InitCTBUtilities: CTBUErr;
FUNCTION CTBGetCTBVersion: INTEGER;
FUNCTION StandardNBP(where: Point; prompt: Str255; numTypes: INTEGER; VAR typeList: NLType; nameFilter: NameFilterUPP; zoneFilter: ZoneFilterUPP; hook: DialogHookUPP; VAR theReply: NBPReply): INTEGER;
FUNCTION CustomNBP(where: Point; prompt: Str255; numTypes: INTEGER; VAR typeList: NLType; nameFilter: NameFilterUPP; zoneFilter: ZoneFilterUPP; hook: DialogHookUPP; userData: LONGINT; dialogID: INTEGER; filter: ModalFilterUPP; VAR theReply: NBPReply): INTEGER;
{$IFC OLDROUTINENAMES }
FUNCTION NuLookup(where: Point; prompt: Str255; numTypes: INTEGER; VAR typeList: NLType; nameFilter: NameFilterUPP; zoneFilter: ZoneFilterUPP; hook: DialogHookUPP; VAR theReply: NBPReply): INTEGER;
FUNCTION NuPLookup(where: Point; prompt: Str255; numTypes: INTEGER; VAR typeList: NLType; nameFilter: NameFilterUPP; zoneFilter: ZoneFilterUPP; hook: DialogHookUPP; userData: LONGINT; dialogID: INTEGER; filter: ModalFilterUPP; VAR theReply: NBPReply): INTEGER;
{$ENDC}
{$ENDC}
{$ALIGN RESET}
{$POP}
{$SETC UsingIncludes := CTBUtilitiesIncludes}
{$ENDC} {__CTBUTILITIES__}
{$IFC NOT UsingIncludes}
END.
{$ENDC}